<template>
  <!-- 专属客服 -->
  <div class="serviceBox">
    <x-header :left-options="{showBack: true,backText:'专属客服'}" class="headerBox"></x-header>
    <div class="chats clearfix" style>
      <div class="time">18:06</div>
      <div class="chatLeft">
        <img src="../assets/images/assistance01.png" />
        <div class="left">我就是你的专属客服哦！</div>
      </div>
      <div class="chatLeft">
        <img src="../assets/images/assistance01.png" />
        <div class="left">我就是你的专属客服哦！</div>
      </div>
      <div class="chatRight">
        <div class="right">好的哦</div>
        <img src="../assets/images/assistance01.png" />
      </div>
      <div class="chatRight">
        <div class="right">好的哦</div>
        <img src="../assets/images/assistance01.png" />
      </div>
    </div>

    <!-- 底部菜单 -->
    <div class="inputBox">
      <img src="../assets/images/chat03.png" />
      <input type="text" cursor-spacing="20" />
      <img src="../assets/images/chat02.png" />
      <img src="../assets/images/chat01.png" />
    </div>
  </div>
</template>

<script>
import { XHeader, } from 'vux'
export default {
  components: {
    XHeader,
  },
}
</script>

<style lang="less" scoped>
.serviceBox {
  /deep/.headerBox {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    .vux-header-left {
      left: 24px;
      .vux-header-back {
        color: #000;
      }
      .left-arrow:before {
        border-color: #000;
      }
    }
  }
  .chats {
    overflow: hidden;
    padding: 20px;
    height: 100%;
    padding-bottom: 100px;
    .time {
      text-align: center;
      font-size: 24px;
      margin-bottom: 20px;
    }
    .chatLeft {
      float: left;
      display: flex;
      align-items: flex-start;
      margin-bottom: 20px;
      clear: both;
    }
    .chatLeft img {
      width: 82px;
      height: 82px;
    }
    .left {
      background: rgb(246, 248, 247);
      color: #333;
      font-size: 28px;
      padding: 10px;
      border-radius: 10px;
      max-width: 70%;
      margin-left: 30px;
      position: relative;
    }
    .left::before {
      content: '';
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-right: 10px solid #fff;
      position: absolute;
      top: 10px;
      left: -10px;
    }
    .chatRight {
      float: right;
      display: flex;
      align-items: flex-start;
      margin-bottom: 20px;
      clear: both;
    }
    .chatRight img {
      width: 82px;
      height: 82px;
    }
    .right {
      background: rgb(141, 228, 180);
      color: #333;
      font-size: 28px;
      padding: 10px;
      border-radius: 10px;
      max-width: 80%;
      margin-right: 30px;
      margin-bottom: 20px;
      position: relative;
    }
    .right::before {
      content: '';
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-left: 10px solid #fff;
      position: absolute;
      top: 10px;
      right: -10px;
    }
  }

  /*  */
  .inputBox {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f0f2f4;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    input {
      background: #fff;
      padding: 15px;
      border-radius: 10px;
      width: 65%;
      outline: none;
    }
    border: none;
    img {
      width: 54px;
      height: 54px;
      margin-left: 20px;
      margin: 10px;
    }
    img:first-child {
      margin-left: 0;
      margin-right: 20px;
    }
  }
}
</style>